#include <REGX52.H>
#include <INTRINS.H>
void Delay1ms(unsigned int xms)	//@11.0592MHz
{
	unsigned char data i, j;
	while(xms--)
	{	
		_nop_();
		i = 11;
		j = 190;
		do
		{
			while (--j);
		} while (--i);
	}
	}


unsigned char ucled = 0x01;//0000 0001

void main()
{
	while(1)
	{
		////1111 1110
		//P2=0xFE;
		//Delay500ms();
		////1111 1101
		//P2=0xFD;
		//Delay500ms();
		////1111 1011
		//P2=0xFB;
		//Delay500ms();
		////1111 0111
		//P2=0xF7;
		//Delay500ms();
		////1110 1111
		//P2=0xEF;
		//Delay500ms();
		////1101 1111
		//P2=0xDF;
		//Delay500ms();
		////1011 1111
		//P2=0xBF;
		//Delay500ms();
		////0111 1111
		//P2=0x7F;
		//Delay500ms();
		////1111 1111
		//P2=0xFF;
		//Delay500ms();
		P2 = ~ucled;
		Delay1ms(5);
		ucled<<=1;
		if(ucled==0x00) 
		{
			ucled=0x01;
		}
		
	}
}